Skip to content

Fix for AIESW-37123#26

Merged
jvillarre merged 1 commit into
Xilinx:mainfrom
snigdha-gupta:AIESW-37123
Jun 24, 2026
Merged

Fix for AIESW-37123#26
jvillarre merged 1 commit into
Xilinx:mainfrom
snigdha-gupta:AIESW-37123

Conversation

@snigdha-gupta

@snigdha-gupta snigdha-gupta commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes LayerInfo initialization failure on Peano/Strix designs when the model path name contains the substring "ret", causing automated L2/L3 debug (-auto / -l3) to exit immediately after the Peano compiler autodetect warning.

Problem

  • On Peano builds, MLDebugger disassembles ELFs via llvm-objdump and parses the output in _parse_lst_llvm() which uses a substring check ("ret" in line) to detect ret instructions.
  • The first line of llvm-objdump output is a file header that includes the model's name. For designs containing ret in their name, the substring "ret" matches before any function is parsed.
  • The code then executed flist[-1] on an empty list → IndexError → LayerInfo init failure.
  • A similar substring risk existed for "rel" substring.

Fix

  • Add _is_llvm_insn_line() to restrict ret / rel parsing to real disassembly rows ( :), skipping objdump headers, section banners, and function/local labels.
  • Match ret and rel as whole instruction tokens (\bret\b, \brel\b) instead of substrings.
  • Guard flist[-1] with if flist: when handling ret outside an active function.

Testing

  • Reproduced on pretrained_deep_ocr_recognition_fixed_int8 Work tree: failed before fix, passes after.
  • LayerInfo init completes: 91 layers, 6 PM-reload ELFs parsed, all layers assigned start PCs.
  • Verified llvm-objdump output line types: only instruction rows contain real ret/rel opcodes.
  • Verified design runs successfully using the automated_debug workflow.

Impact

  • Peano autodetect behavior unchanged (warning still expected when .lst is absent).
  • No change to Chess LST parsing path.
  • Fixes false init failures for any design whose path contains "pretrained" (or similar ret/rel substrings).
  • Fixes AIESW-37123.

Signed-off-by: snigupta <snigupta@amd.com>
@jvillarre jvillarre self-requested a review June 24, 2026 20:45
@jvillarre jvillarre merged commit 9283e80 into Xilinx:main Jun 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants